package com.ruoyi.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.business.domain.Member;
import com.ruoyi.business.mapper.MemberMapper;
import com.ruoyi.business.service.IMemberService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class MemberServiceImpl extends ServiceImpl<MemberMapper, Member> implements IMemberService {

    @Resource
    private MemberMapper memberMapper;

    /**
     * 查询Member列表
     *
     * @param member Member
     * @return Member集合
     */
    @Override
    public List<Member> selectMemberList(Member member) {
        return memberMapper.selectMemberList(member);
    }

    ;

    @Override
    public List<Member> selectMemberListByUserId(Long userId) {
        return memberMapper.selectMemberListByUserId(userId);
    }

    ;

    public List<Member> selectMemberListByTypeAndStatus(Member member) {
        return memberMapper.selectMemberListByTypeAndStatus(member);
    }

    ;

    public List<Member> selectMemberListByTypeAndTime(Member member) {
        return memberMapper.selectMemberListByTypeAndTime(member);
    }

    ;

    public List<Member> selectMemberListByTypeAndNumber(Member member) {
        return memberMapper.selectMemberListByTypeAndNumber(member);
    }

    public Member selectMemberById(Long id) {
        return memberMapper.selectMemberById(id);
    }

    ;

    /**
     * 更新Member数据
     *
     * @param member Member
     */
    @Override
    public int insertMember(Member member) {
        return memberMapper.insertMember(member);
    }

    ;

    /**
     * 更新Member数据
     *
     * @param member Member
     */
    @Override
    public int updateMember(Member member) {
        return memberMapper.updateMember(member);
    }

    ;

    @Override
    public int deleteMemberByIds(Long[] ids) {
        return memberMapper.deleteMemberByIds(ids);
    }
}
